package com.example.productconsumer.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(name="product-provider")
public interface ProductRemote {


    @GetMapping("/productbyid")
    public String getProductionById(@RequestParam("id") String id);

    @RequestMapping("/addpro")
    public String add(@RequestParam("name") String name,@RequestParam("price")int price);

    @RequestMapping("/addpro2")
    public String add2(@RequestBody Map map);

}
